import { get, post } from '@/http'
import qs from 'qs'

// 机构
export function getResearchOrgByIdApi(id: number) {
    return get('/research/api-admin/research-org-get', id)
}
export function addResearchOrgApi(params: any) {
    return post('/research/api-admin/research-org-insert', params)
}
export function updateResearchOrgApi(params: any) {
    return post('/research/api-admin/research-org-update', params)
}
// 更新问卷计
export function updateQuestionnaireApi(params: any) {
    return post('/research/api-admin/questionnaire-update', params)
}

// 更新问题反馈
export function updateFeedbackApi(params: any) {
    return post('/research/api-admin/feedback-update', params)
}

// 首页版本信息
export function getVersionListApi(params: any) {
    return post('/research/api-admin/version-list', params)
}
// 奖杯
export function updateTrophyApi(params: any) {
    return post('/research/api-admin/trophy-update', params)
}
export function getTrophyByIdApi(id: number) {
    return get('/research/api-admin/trophy-get', id)
}
// 榜单
export function getRankByIdApi(id: number) {
    return get('/research/api-admin/rank-get', id)
}
export function addRankApi(params: any) {
    return post('/research/api-admin/rank-insert', params)
}
export function updateRankApi(params: any) {
    return post('/research/api-admin/rank-update', params)
}
export function addRankListApi(params: any) {
    return post('/research/api-admin/ranklist-insert', params)
}
export function updateRankListApi(params: any) {
    return post('/research/api-admin/ranklist-update', params)
}
export function removeRankListApi(params: any) {
    return get('/research/api-admin/ranklist-remove', params)
}
// 问卷管理
export function getSurveyTemplateByIdApi(id: number) {
    return get('/research/api-admin/survey-template-get', id)
}
export function addSurveyTemplateApi(params: any) {
    return post('/research/api-admin/survey-template-insert', params)
}
export function updateSurveyTemplateApi(params: any) {
    return post('/research/api-admin/survey-template-update', params)
}
export function viewSurveyTemplateApi(id: number) {
    return get('/research/api-admin/survey-template-view/' + id)
}
export function getListQuestionApi(params: any) {
    return post('/research/api-admin/survey-question-group-list', params)
}
export function updateQuestionGroupApi(params: any) {
    return post('/research/api-admin/survey-question-group-update', params)
}
export function updateQuestionDetailApi(params: any) {
    return post('/research/api-admin/survey-question-detail-update', params)
}
export function updateQuestionGroupSortApi(params: any) {
    return post('/research/api-admin/survey-template-update', params)
}
export function updateQuestionDetailSortApi(params: any) {
    return post('/research/api-admin/survey-template-update', params)
}
